import request from "@/utils/request";


export const cartListService = () => {
    return request.get("/cart")
}

export const insertCartService = ({id, count}) => {
    const params = new URLSearchParams();
    params.append('id', id)
    params.append('count', count)
    return request.post('/cart/add', params)
}

export const delCartService = (id) => {
    const params = new URLSearchParams();
    params.append('id', id)
    console.log(id)
    return request.post('/cart/delete', params)
}

export const modifyCartService = (cart) => {
    return request.put('/cart/modify', cart)
}